<?php
include_once "../../../../common.php";
if(isset($_POST['ID']) && is_numeric($_POST['ID']) && !empty($_POST['ID']))
{
	if(!isset($error))
	{	
		$query = "	UPDATE WebshopContactpersonen SET 
						FirstNameBasis = '".str_replace("'","",$_POST['FirstNameBasis'])."',
						Mobile = '".str_replace("'","",$_POST['Mobile'])."',
						Firstname = '".str_replace("'","",$_POST['Firstname'])."',
						Initials = '".str_replace("'","",$_POST['Initials'])."',
						Surname = '".str_replace("'","",$_POST['Surname'])."',
						Insertion = '".str_replace("'","",$_POST['Insertion'])."',
						Function = '".str_replace("'","",$_POST['Function'])."',
						Sex = '".str_replace("'","",$_POST['Sex'])."',
						Email = '".str_replace("'","",$_POST['Email'])."'
					WHERE ID = '".str_replace("'","",$_POST['ID'])."' 
					LIMIT 1";
		$_MySQL->runQuery($query);
		echo "succes";
	}
	else
	{
		foreach($error AS $what => $why)
		{
			echo $what.": ".$why."\n";
		}
	}
}
else
{
	echo "ERROR!! contactpersoon ombekend";
}